package cn.wolfcode.user.dao.impl;

import cn.wolfcode.student.util.MybatisUtils;
import cn.wolfcode.user.dao.UserDAO;
import cn.wolfcode.user.domain.User;
import org.apache.ibatis.session.SqlSession;

import java.util.HashMap;
import java.util.Map;


public class UserDAOImpl implements UserDAO {
    private SqlSession ss = MybatisUtils.getSql();
    @Override
    public User check(String username, String password) {
        Map<String,Object> map  = new HashMap<>();
        map.put("username", username);
        map.put("password", password);
        return ss.selectOne("cn.wolfcode.user.mapper.UserMapper.check", map);
    }
}
